/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.*;
import java.util.regex.*;

/**
 *
 * @author Pe Bong
 */
public class Employee {
    String name ;
    String add;
    String phone;

    public Employee(){
        String name = "";
        String add = "";
        String phone = "";
    }
    Scanner input = new Scanner(System.in);
    public String standardizeAdd(String add1){
        int i =0;
        int j = 0;
        String [] str = {"street","driver","road","\\s+"};
        
        for (i = 0 ; i < str.length; i ++){
            Pattern pat = Pattern.compile(str[i],Pattern.CASE_INSENSITIVE);
            Matcher mat = pat.matcher(add1);
            for(j =0 ; i< add1.length();j++){
                if(mat.find()){
                    switch (i) {
                        case 0: add1 = mat.replaceAll("St");
                            break;
                        case 1: add1 = mat.replaceAll("Dr");
                            break;
                        case 2: add1 = mat.replaceAll("Rd");
                            break;
                        case 3: add1 = mat.replaceAll(" ");
                            break;
                    }
                }
                else{
                    break;
                }
            }
        }
        this.add = add1;
        return this.add;
    }
    public String standardizePhone( String phone1){
        int i =0;
        String str = "\\D";
        Pattern pat = Pattern.compile(str,Pattern.CASE_INSENSITIVE);
        Matcher mat = pat.matcher(phone1);
        
        for (i = 0 ; i < phone1.length(); i ++){
            if(mat.find()){
                phone1 = mat.replaceAll("-");
                this.phone = phone1;
            }
        }

        return this.phone;
    }

    public void display(){
        int i =0;
        System.out.format( "\n  %1$12s   |   %2$12s   |   %3$12s      |\n", this.name, this.add, this.phone);
       
    }
}